//
//  FirstCell.m
//  UI11_1_TabelViewCell_Model类_混合Cell
//
//  Created by Scott on 15/5/22.
//  Copyright (c) 2015年 www.lanou3g.com 蓝欧3G. All rights reserved.
//

#import "FirstCell.h"

@implementation FirstCell

- (void)dealloc
{
    [_leftLabel release];
    [_rightLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.leftLabel = [[UILabel alloc] init];
        self.leftLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.leftLabel];
        [_leftLabel release];
        
        
        self.rightLabel = [[UILabel alloc] init];
        self.rightLabel.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.rightLabel];
        [_rightLabel release];
        
    }
    
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat w = self.contentView.frame.size.width;
    CGFloat h = self.contentView.frame.size.height;
    
    self.leftLabel.frame = CGRectMake(0, 0, w / 2, h);
    self.rightLabel.frame = CGRectMake(w / 2, 0, w / 2, h);
    
    
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
